<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>清单应用JQuery版</title>
</head>

<body>
  <div>
    <h2 id="app"></h2>
    <input type="text" name="" id="todo-input">
  </div>

</body>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
<script>
  $("#todo-input").on('input', function () {
    let val = $(this).val()
    $("#app").html(val)
  })
</script>

</html>